/* Scripts for Pardus Sector Tool by Yassen
 * Yassen (c) 2010
 *
 * typees.js
 * Defines types used in other utilities/scripts.
 *
 * See docs/objects.txt for more information.
 *
 */

function BuildingInfo(name, tile, image, upkeep, production)
{
  this.name = name;
  this.tile = tile;
  this.image = image;
  this.upkeep = upkeep;
  this.production = production;
}

function PlanetInfo(type, image, upkeep, production)
{
  this.type = type;
  this.image = image;
  this.upkeep = upkeep;
  this.production = production;
}

function StarbaseInfo(type, npc, image, upkeep, production)
{
  this.type = type;
  this.npc = npc;
  this.image = image;
  this.upkeep = upkeep;
  this.production = production;
}

function Building(id, x, y, name, owner, level)
{
  this.id = id;
  this.x = x;
  this.y = y;
  this.name = name;
  this.owner = owner;
  this.level = level;
}

function Planet(id, x, y, type, population)
{
  this.id = id;
  this.x = x;
  this.y = y;
  this.type = type;
  this.population = population;
}

function Starbase(id, x, y, type, owner, population)
{
  this.id = id;
  this.x = x;
  this.y = y;
  this.type = type;
  this.owner = owner;
  this.population = population;
}

function Background(id, x, y, image)
{
  this.id = id;
  this.x = x;
  this.y = y;
  this.image = image;
}

function Commodity(name, image)
{
  this.name = name;
  this.image = image;
}

function Tile(id, type, x, y, selected)
{
  this.id = id;
  this.type = type;
  this.x = x;
  this.y = y;
  this.selected = (selected == undefined? false: selected);
}

function Sector(name, buildings, planets, starbases, backgrounds, tiles, map)
{
  this.name = name;
  this.buildings = buildings;
  this.planets = planets;
  this.starbases = starbases;
  this.backgrounds = backgrounds;
  this.tiles = tiles;
  this.map = map;
}

function Pricelist(name, buy, sell)
{
  this.name = name;
  this.buy = buy;
  this.sell = sell;
}